columview: Fix cell creation
authorMatthias Clasen <mclasen@redhat.com>
Fri, 19 Jun 2020 15:40:54 +0000 (11:40 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 19 Jun 2020 15:42:58 +0000 (11:42 -0400)
We were getting lost in the columnview internal
structure here. The rows are children of the listview,
not of the columnview itself.

gtk/gtkcolumnviewcolumn.c

index 708ff6cb5be3d86242ac3d077bb6159f64143dc7..c0aaf631bb5860ba12fc8558c9a006654e348f9e 100644 (file)
@@ -519,12 +519,14 @@ gtk_column_view_column_get_allocation (GtkColumnViewColumn *self,
 static void
 gtk_column_view_column_create_cells (GtkColumnViewColumn *self)
 {
+  GtkListView *list;
   GtkWidget *row;
 
   if (self->first_cell)
     return;
 
-  for (row = gtk_widget_get_first_child (GTK_WIDGET (self->view));
+  list = gtk_column_view_get_list_view (GTK_COLUMN_VIEW (self->view));
+  for (row = gtk_widget_get_first_child (GTK_WIDGET (list));
        row != NULL;
        row = gtk_widget_get_next_sibling (row))
     {